package com.zhigongtech.tender.sys.service;

import com.zhigongtech.common.consts.CacheConst;
import com.zhigongtech.tender.sys.entity.Office;

import java.io.Serializable;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;

import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Alan
 * @since 2019-06-14
 */
public interface IOfficeService extends IService<Office> {

	/**   
	 * <p>Title: getById</p>   
	 * <p>Description: </p>   
	 * @param id
	 * @return   
	 * @see com.baomidou.mybatisplus.extension.service.IService#getById(java.io.Serializable)   
	 * @author: Alan
	 * @date:   2019-06-17 15:07:44
	 */
	@Cacheable(value=CacheConst.CACHE_OFFICE, key="office.id[#id]")
	public Office getById(Serializable id);

	/**   
	 * <p>Title: updateById</p>   
	 * <p>Description: </p>   
	 * @param entity
	 * @return   
	 * @see com.baomidou.mybatisplus.extension.service.IService#updateById(java.lang.Object)   
	 * @author: Alan
	 * @date:   2019-06-17 15:13:29
	 */
	@CachePut(value=CacheConst.CACHE_OFFICE, key="office.id[#entity.id]")
	public boolean updateById(Office entity);

	/**   
	 * <p>Title: removeById</p>   
	 * <p>Description: </p>   
	 * @param id
	 * @return   
	 * @see com.baomidou.mybatisplus.extension.service.IService#removeById(java.io.Serializable)   
	 * @author: Alan
	 * @date:   2019-06-17 15:15:42
	 */
	@CacheEvict(value=CacheConst.CACHE_OFFICE, key="office.id[#entity.id]")
	public boolean removeById(Serializable id);

	
	
}
